-
Notifications
You must be signed in to change notification settings - Fork 555
refactor(css): refactor autocomplete to use common css vars #6814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 2fe2e6c:
|
e7c8caf to
1cdf0a5
Compare
Haroenv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
packages/instantsearch-ui-components/src/components/autocomplete/AutocompletePanel.tsx
Show resolved
Hide resolved
@aymeric-giraudet Now it should look more subtle. For the color, I'm using the example header gradient first stop color as the primary color, and using it to mix it with the background color. This way I only need a primary color, whereas in Autocomplete.js, a different color/alpha is used as the selected color. background-color: color-mix(
in srgb,
rgb(var(--ais-primary-color-rgb)) 10%, /* I updated this value */
rgb(var(--ais-background-color-rgb))
);WDYT?
|
|
@aymeric-giraudet By the way, I noticed that the autocomplete item's |
|
yes, as that's the WAI-ARIA suggestion. The mouse is only only used for clicking and the keyboard for selection. |
Makes sense, then I guess Autocomplete.js implem is wrong, |



Summary
This PR:
Result